﻿<div class="blade-content __medium-wide">
    <div class="blade-inner">
        <div class="inner-block clearfix">
            <form class="form" name="detailForm">
                <div ng-init="setForm(detailForm)">
                    <label class="form-label">Code</label>
                    <div class="form-input">
                        <p class="form-text">{{blade.currentEntity.id}}</p>
                    </div>
                </div>
                <div class="form-group">
                    <label class="form-label">Name</label>
                    <div class="form-input">
                        <input ng-model="blade.currentEntity.name" type="text" focus-on="" required placeholder="Enter name">
                    </div>
                </div>
                <div class="columns clearfix">
                    <div class="column">
                        <div class="form-group">
                            <label class="form-label">Catalog</label>
                            <div class="form-input">
                                <ui-select ng-model="blade.currentEntity.catalog" required>
                                    <ui-select-match placeholder="Select...">{{$select.selected.name}}</ui-select-match>
                                    <ui-select-choices repeat="x.id as x in catalogs | filter: { name: $select.search }">
                                        <span ng-bind-html="x.name | highlight: $select.search"></span>
                                    </ui-select-choices>
                                </ui-select>
                            </div>
                        </div>
                    </div>
                    <div class="column">
                        <div class="form-group">
                            <label class="form-label">State</label>
                            <div class="form-input">
                                <ui-select ng-model="blade.currentEntity.storeState" required>
                                    <ui-select-match placeholder="Select...">{{$select.selected}}</ui-select-match>
                                    <ui-select-choices repeat="x in storeStates | filter: $select.search">
                                        <span ng-bind-html="x | highlight: $select.search"></span>
                                    </ui-select-choices>
                                </ui-select>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="columns clearfix">
                    <div class="column">
                        <div class="form-group">
                            <label class="form-label">Default language</label>
                            <div class="form-input">
                                <ui-select ng-model="blade.currentEntity.defaultLanguage" required>
                                    <ui-select-match placeholder="Select...">{{$select.selected}}</ui-select-match>
                                    <ui-select-choices repeat="x in languages | filter: $select.search">
                                        <span ng-bind-html="x | highlight: $select.search"></span>
                                    </ui-select-choices>
                                </ui-select>
                            </div>
                        </div>
                    </div>
                    <div class="column">
                        <div class="form-group">
                            <label class="form-label">Additional languages</label>
                            <div class="form-input" data-role="input-control">
                                <ui-select multiple ng-model="blade.currentEntity.additionalLanguages">
                                    <ui-select-match placeholder="Select...">{{$item}}</ui-select-match>
                                    <ui-select-choices repeat="x in languages | filter:'!'+blade.currentEntity.defaultLanguage | filter: $select.search">
                                        <span ng-bind-html="x | highlight: $select.search"></span>
                                    </ui-select-choices>
                                </ui-select>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="columns clearfix">
                    <div class="column">
                        <div class="form-group">
                            <label class="form-label">Default currency</label>
                            <div class="form-input">
                                <ui-select ng-model="blade.currentEntity.defaultCurrency" required>
                                    <ui-select-match placeholder="Select...">{{$select.selected}}</ui-select-match>
                                    <ui-select-choices repeat="x in currencies | filter: $select.search">
                                        <span ng-bind-html="x | highlight: $select.search"></span>
                                    </ui-select-choices>
                                </ui-select>
                            </div>
                        </div>
                    </div>
                    <div class="column">
                        <div class="form-group">
                            <label class="form-label">Additional currencies</label>
                            <div class="form-input" data-role="input-control">
                                <ui-select multiple ng-model="blade.currentEntity.additionalCurrencies">
                                    <ui-select-match placeholder="Select...">{{$item}}</ui-select-match>
                                    <ui-select-choices repeat="x in currencies | filter:'!'+blade.currentEntity.defaultCurrency | filter: $select.search">
                                        <span ng-bind-html="x | highlight: $select.search"></span>
                                    </ui-select-choices>
                                </ui-select>
                            </div>
                        </div>
                    </div>
                </div>
            </form>

            <va-widget-container group="storeDetail" blade="blade" gridster-opts="{width: 526}"></va-widget-container>
        </div>
    </div>
</div>